package com.tanran.common.controller;

import com.tanran.common.exception.CommonException;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;

import java.io.IOException;

/**
 * Created by Enzo Cotter on 2019/11/14.
 */
@ControllerAdvice
public class ExceptionHand {
    @ExceptionHandler({CommonException.class, IOException.class})
    public String error(){
        return "error";
    }
}
